<template>
<div class="features-section">
    <div class="features-container">
        <div class="feature-card" v-for="(feature, index) in features" :key="index">
            <div class="feature-icon" :style="{ backgroundColor: feature.color }">
                <i :class="feature.icon"></i>
            </div>
            <div class="feature-content">
                <h3 class="feature-title">{{ feature.title }}</h3>
                <p class="feature-desc">{{ feature.description }}</p>
            </div>
        </div>
    </div>
</div>
</template>

<script>
export default {
    name: 'HomeFeatures',
    data() {
        return {
            features: [
                {
                    title: '景点预览',
                    description: '探索美丽乡村的自然风光',
                    icon: 'el-icon-location-outline',
                    color: '#409EFF'
                },
                {
                    title: '民宿预订',
                    description: '体验当地特色住宿环境',
                    icon: 'el-icon-house',
                    color: '#67C23A'
                },
                {
                    title: '品尝美食',
                    description: '享受地道乡村特色美食',
                    icon: 'el-icon-shopping-bag-1',
                    color: '#E6A23C'
                },
                {
                    title: '活动报名',
                    description: '参与丰富多彩的文化活动',
                    icon: 'el-icon-s-promotion',
                    color: '#F56C6C'
                },
                {
                    title: '路线规划',
                    description: '定制专属乡村旅游路线',
                    icon: 'el-icon-guide',
                    color: '#800080'
                },
                {
                    title: '弘扬非遗',
                    description: '传承中华优秀传统文化',
                    icon: 'el-icon-star-on',
                    color: '#FF6B6B'
                }
            ]
        }
    }
}
</script>

<style scoped>
.features-section {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    padding: 0 20px;
}

.feature-card {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.feature-icon i {
    font-size: 36px;
    color: white;
}

.feature-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.feature-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 1200px) {
    .features-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .features-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .feature-card {
        padding: 20px 15px;
    }
}

@media (max-width: 480px) {
    .features-container {
        grid-template-columns: 1fr;
    }
}
</style> 